package br.com.catalogodigital.filter;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import br.com.catalogodigital.bean.AnuncianteBean;
import br.com.catalogodigital.dao.AnuncianteDao;
import br.com.catalogodigital.entity.Anunciante;

/**
 * Servlet implementation class Autenticar
 */
@WebServlet("/login")
public class Autenticar extends HttpServlet {
	private static final long serialVersionUID = 1L;

	/**
	 * @see HttpServlet#HttpServlet()
	 */
	public Autenticar() {
		super();

	}

	protected void doPost(HttpServletRequest request,
			HttpServletResponse response) throws ServletException, IOException {

   		AnuncianteBean anuncianteBean = new AnuncianteBean();
		
 		String login = request.getParameter("login");
		String senha = request.getParameter("senha");

		
		
	/*if(anuncianteBean.autenticarLogin(login, senha) ==true){
			
			HttpSession session = request.getSession();
			
			session.setAttribute("login", login);
			session.setAttribute("senha", senha);
				
			response.sendRedirect("pasta-privada/home-anunciante.xhtml");
			
		}
		else
			response.sendRedirect("home.xhtml");
		*/	
		

		
		
	}

}
